/*
 * Copyright (C) 2018 INFORMATION SERVICES INTERNATIONAL - DENTSU, LTD. All Rights Reserved.
 *
 * Unless you have purchased a commercial license,
 * the following license terms apply:
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program. If not, see <https://www.gnu.org/licenses/>.
 */

package org.iplass.adminconsole.client.metadata.ui.entity.viewcontrol;

import com.smartgwt.client.widgets.grid.ListGridRecord;

public class ViewControlSettingListGridRecord extends ListGridRecord {

	public static final String AGNAME = "autoGenerateSettingName";
	public static final String DISPLAY_NAME = "displayName";

	public static final String EXISTDVIEW = "existDetailView";
	public static final String AGDVIEW = "autoGenerateDetailView";

	public static final String EXISTSVIEW = "existSearchView";
	public static final String AGSVIEW = "autoGenerateSearchView";

	public static final String EXISTBVIEW = "existBulkView";
	public static final String AGBVIEW = "autoGenerateBulkView";

	public static final String PERMIT_ROLES = "permitRoles";

	public String getSettingName() {
		return getAttribute(AGNAME);
	}

	public void setSettingName(String value) {
		setAttribute(AGNAME, value);
	}

	public String getDisplayName() {
		return getAttribute(DISPLAY_NAME);
	}

	public void setDisplayName(String value) {
		setAttribute(DISPLAY_NAME, value);
	}

	public boolean isExistDetailView() {
		return getAttributeAsBoolean(EXISTDVIEW);
	}

	public void setExistDetailView(boolean value) {
		setAttribute(EXISTDVIEW, value);
	}

	public boolean isAutoGenerateDetailView() {
		return getAttributeAsBoolean(AGDVIEW);
	}

	public void setAutoGenerateDetailView(boolean value) {
		setAttribute(AGDVIEW, value);
	}

	public boolean isExistSearchView() {
		return getAttributeAsBoolean(EXISTSVIEW);
	}

	public void setExistSearchView(boolean value) {
		setAttribute(EXISTSVIEW, value);
	}

	public boolean isAutoGenerateSearchView() {
		return getAttributeAsBoolean(AGSVIEW);
	}

	public void setAutoGenerateSearchView(boolean value) {
		setAttribute(AGSVIEW, value);
	}
	
	public boolean isExistBulkView() {
		return getAttributeAsBoolean(EXISTBVIEW);
	}

	public void setExistBulkView(boolean value) {
		setAttribute(EXISTBVIEW, value);
	}

	public boolean isAutoGenerateBulkView() {
		return getAttributeAsBoolean(AGBVIEW);
	}

	public void setAutoGenerateBulkView(boolean value) {
		setAttribute(AGBVIEW, value);
	}

	public String[] getPermitRoles() {
		return getAttributeAsStringArray(PERMIT_ROLES);
	}

	public void setPermitRoles(String[] value) {
		setAttribute(PERMIT_ROLES, value);
	}
}
